package com.od.service.serviceImpl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.od.mapper.ContactMapper;
import com.od.service.ContactService;

@Service
public class ContactServiceImpl implements ContactService {
    @Autowired
    private ContactMapper contactMapper;

    @Override
    public List<Map<String, Object>> getContactByEnterprise(String enterpriseId) {
        return contactMapper.selectContactByEnterprise(Integer.parseInt(enterpriseId));
    }

    @Override
    public List<Map<String, Object>> getContactBySeeker(String seekerId) {
        return contactMapper.selectContactBySeeker(Integer.parseInt(seekerId));
    }

    @Override
    public int getContactCountBySeeker(String seekerId) {
        return contactMapper.selectContactCountBySeeker(Integer.parseInt(seekerId));
    }

    @Override
    public int getContactCountByEnterprise(String enterpriseId) {
        return contactMapper.selectContactCountByEnterprise(Integer.parseInt(enterpriseId));
    }

}
